﻿<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="utf-8"/>
    <meta http-equiv="X-UA-Compatible" content="IE=edge"/>
    <title>萤火商城-商业版</title>
    <meta name="viewport" content="width=device-width, initial-scale=1"/>
    <meta name="renderer" content="webkit"/>
    <meta http-equiv="Cache-Control" content="no-siteapp"/>
    <link rel="icon" type="image/png" href="assets/common/i/favicon.ico"/>
    <meta name="apple-mobile-web-app-title" content="萤火商城-商业版"/>
    <link rel="stylesheet" href="Css/amazeui.min.css"/>
    <link rel="stylesheet" href="Css/app.css"/>
    <link rel="stylesheet" href="Css/font_783249_3hfdb7m5w0j.css">
    <script src="Scripts/jquery.min.js"></script>
    <script src="Scripts/font_783249_e5yrsf08rap.js"></script>
    <script>
        BASE_URL = 'https://demo.yiovo.com/';
        STORE_URL = 'index.php?s=/store';
    </script>
</head>

<body data-type="">
<div class="am-g tpl-g">

    <div class="row">
        <div class="am-u-sm-12 am-u-md-12 am-u-lg-12">
            <div class="widget am-cf">
                <div class="widget-head am-cf">
                    <div class="widget-title am-cf">用户列表</div>
                </div>
                <div class="widget-body am-fr">
                    <!-- 工具栏 -->
                    <div class="page_toolbar am-margin-bottom-xs am-cf">
                        <form class="toolbar-form" action="">
                            <input type="hidden" name="s" value="/store/user/index">
                            <div class="am-u-sm-12 am-u-md-9 am-u-sm-push-3">
                                <div class="am fr">
                                    <div class="am-form-group am-fl">
                                        <select name="gender"
                                                data-am-selected="{btnSize: 'sm', placeholder: '性别'}">
                                            <option value=""></option>
                                            <option value="-1"
                                            >全部
                                            </option>
                                            <option value="1"
                                            >男
                                            </option>
                                            <option value="2"
                                            >女
                                            </option>
                                            <option value="0"
                                            >未知
                                            </option>
                                        </select>
                                    </div>
                                    <div class="am-form-group am-fl">
                                        <div class="am-input-group am-input-group-sm tpl-form-border-form">
                                            <input type="text" class="am-form-field" name="nickName"
                                                   placeholder="请输入微信昵称"
                                                   value="">
                                            <div class="am-input-group-btn">
                                                <button class="am-btn am-btn-default am-icon-search"
                                                        type="submit"></button>
                                            </div>
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </form>
                    </div>

                    <div class="am-scrollable-horizontal am-u-sm-12">
                        <table width="100%" class="am-table am-table-compact am-table-striped
                         tpl-table-black am-text-nowrap">
                            <thead>
                            <tr>
                                <th>用户名</th>
                                <th>昵称</th>
                                <th>邮箱</th>
                                <th>QQ</th>
                                <th>区域</th>
                                <th>识别码</th>
                                <th>最小进货额度</th>
                                <th>操作</th>
                            </tr>
                            </thead>
                            <tbody id="list">
                            <tr>
                                <td class="am-text-middle">11635</td>
                                <td class="am-text-middle">
                                    <a href="https://wx.qlogo.cn/mmopen/vi_32/DYAIOgq83erzYtkict7uMZBJUJYJmWGoASXMDZtibAzjSyt5OhRHWUyktVKE62lZGeJiaN5OCcj18LZ3ShUpsvScg/132"
                                       title="点击查看大图" target="_blank">
                                        <img src="Picture/32e0ad96b2bb4b85a9ded4f1c238469f.gif" width="72" height="72"
                                             alt="">
                                    </a>
                                </td>
                                <td class="am-text-middle">刘*德</td>
                                <td class="am-text-middle">0.00</td>
                                <td class="am-text-middle">男</td>
                                <td class="am-text-middle">中国</td>
                                <td class="am-text-middle">中国</td>
                                <td class="am-text-middle">
                                    <div class="tpl-table-black-operation">
                                        <a href="javascript:void(0);"
                                           class="item-delete tpl-table-black-operation-del"
                                           data-id="11635">
                                            <i class="am-icon-trash"></i> 删除
                                        </a>
                                    </div>
                                </td>
                            </tr>

                            </tbody>
                        </table>
                    </div>
                    <div class="am-u-lg-12 am-cf">
                        <div class="am-fr">
                            <ul class="pagination">
                                <li class="disabled"><span>&laquo;</span></li>
                                <li class="active"><span>1</span></li>
                                <li><a href="/index.php?s=%2Fstore%2Fuser%2Findex&amp;page=2">2</a></li>
                                <li><a href="/index.php?s=%2Fstore%2Fuser%2Findex&amp;page=3">3</a></li>
                                <li><a href="/index.php?s=%2Fstore%2Fuser%2Findex&amp;page=4">4</a></li>
                                <li><a href="/index.php?s=%2Fstore%2Fuser%2Findex&amp;page=5">5</a></li>
                                <li><a href="/index.php?s=%2Fstore%2Fuser%2Findex&amp;page=6">6</a></li>
                                <li><a href="/index.php?s=%2Fstore%2Fuser%2Findex&amp;page=7">7</a></li>
                                <li><a href="/index.php?s=%2Fstore%2Fuser%2Findex&amp;page=8">8</a></li>
                                <li class="disabled"><span>...</span></li>
                                <li><a href="/index.php?s=%2Fstore%2Fuser%2Findex&amp;page=108">108</a></li>
                                <li><a href="/index.php?s=%2Fstore%2Fuser%2Findex&amp;page=109">109</a></li>
                                <li><a href="/index.php?s=%2Fstore%2Fuser%2Findex&amp;page=2">&raquo;</a></li>
                            </ul>
                        </div>
                        <div class="am-fr pagination-total am-margin-right">
                            <div class="am-vertical-align-middle">总记录：1634</div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
    <script>
        $(function () {
            var tpl_td = '<td class="am-text-middle">{0}</td>';
            var tpl_edit = ' <div class="tpl-table-black-operation">\n' +
                '                                        <a href="javascript:void(0);"\n' +
                '                                           class="item-delete tpl-table-black-operation-del"\n' +
                '                                           data-id="{}">\n' +
                '                                            <i class="am-icon-pencil"></i> 编辑\n' +
                '                                        </a>\n' +
                '                                    </div>'
            // 删除元素
            var url = "index.php?s=/store/user/delete";

            $('.item-delete').delete('user_id', url, '删除后不可恢复，确定要删除吗？');
            var refrashTable = function (data) {
                console.log(data);
                var tr = "";
                for (var index in data.rows) {
                    var channel = data.rows[index];
                    tr += "<tr>";
                    if (channel.user) {
                        tr += StringFormat(tpl_td, channel.user.username);
                        tr += StringFormat(tpl_td, channel.user.nickname);
                        tr += StringFormat(tpl_td, channel.user.email);
                        tr += StringFormat(tpl_td, channel.user.qq);
                    } else return;
                    if (channel.regions)
                        tr += StringFormat(tpl_td, channel.regions.merger_name);
                    else
                        tr += StringFormat(tpl_td, "-");

                    tr += StringFormat(tpl_td, channel.uid);
                    tr += StringFormat(tpl_td, channel.min_price);

                    tr += "</tr>";
                }
                $("#list").append(tr);

            }
            getChannels({}, refrashTable)
        });

    </script>


    <!-- 内容区域 end -->

</div>
<script src="Scripts/layer.js"></script>
<script src="Scripts/jquery.form.min.js"></script>
<script src="Scripts/amazeui.min.js"></script>
<script src="Scripts/webuploader.html5only.js"></script>
<script src="Scripts/art-template.js"></script>
<script src="Scripts/app.js"></script>
<script src="Scripts/api.js"></script>
<script src="Scripts/func.js"></script>
<script src="Scripts/file.library.js"></script>
</body>

</html>
